package com.ruoyi.voucher.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.voucher.mapper.VoucherTemplateDetailMapper;
import com.ruoyi.voucher.domain.VoucherTemplateDetail;
import com.ruoyi.voucher.service.IVoucherTemplateDetailService;

/**
 * 凭证模版详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-21
 */
@Service
public class VoucherTemplateDetailServiceImpl extends ServiceImpl<VoucherTemplateDetailMapper,VoucherTemplateDetail> implements IVoucherTemplateDetailService
{
    @Autowired
    private VoucherTemplateDetailMapper voucherTemplateDetailMapper;

    /**
     * 查询凭证模版详情
     * 
     * @param id 凭证模版详情主键
     * @return 凭证模版详情
     */
    @Override
    public VoucherTemplateDetail selectVoucherTemplateDetailById(Long id)
    {
        return voucherTemplateDetailMapper.selectVoucherTemplateDetailById(id);
    }

    /**
     * 查询凭证模版详情列表
     * 
     * @param voucherTemplateDetail 凭证模版详情
     * @return 凭证模版详情
     */
    @Override
    public List<VoucherTemplateDetail> selectVoucherTemplateDetailList(VoucherTemplateDetail voucherTemplateDetail)
    {
        return voucherTemplateDetailMapper.selectVoucherTemplateDetailList(voucherTemplateDetail);
    }

    /**
     * 新增凭证模版详情
     * 
     * @param voucherTemplateDetail 凭证模版详情
     * @return 结果
     */
    @Override
    public int insertVoucherTemplateDetail(VoucherTemplateDetail voucherTemplateDetail)
    {
        return voucherTemplateDetailMapper.insert(voucherTemplateDetail);
    }

    /**
     * 修改凭证模版详情
     * 
     * @param voucherTemplateDetail 凭证模版详情
     * @return 结果
     */
    @Override
    public int updateVoucherTemplateDetail(VoucherTemplateDetail voucherTemplateDetail)
    {
        return voucherTemplateDetailMapper.updateById(voucherTemplateDetail);
    }

    /**
     * 批量删除凭证模版详情
     * 
     * @param ids 需要删除的凭证模版详情主键
     * @return 结果
     */
    @Override
    public int deleteVoucherTemplateDetailByIds(Long[] ids)
    {
        return voucherTemplateDetailMapper.deleteVoucherTemplateDetailByIds(ids);
    }

    /**
     * 删除凭证模版详情信息
     * 
     * @param id 凭证模版详情主键
     * @return 结果
     */
    @Override
    public int deleteVoucherTemplateDetailById(Long id)
    {
        return voucherTemplateDetailMapper.deleteVoucherTemplateDetailById(id);
    }
}
